package com.song.pattern.decorator;

import com.song.pattern.decorator.source.Sourceable;

public class Decorator implements Sourceable{
	
	private Sourceable source;
	public Decorator(Sourceable source) {
		this.source = source;
	}
	
	@Override
	public void method() {
		before();
		source.method();
		after();
	}
	
	public void before(){
		System.out.println("before decorator!");
	}
	
	public void after(){
		System.out.println("after decorator!");
	}
	
}
